import request from '@/config/axios'

export interface License {
  startDate: string
  endDate: string
  matStartDate: string
  matEndDate: string
  organ: string
  licenceType: number
  licenceTypeName: string
  status: string
  statusName: string
  msg: string
  serialNum: string
}


export const uploadLicense = async (file) => {
  return await request.upload({
    url: '/gateway/license/upload',
    data: file,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}


export const getLicense = async (): Promise<IResponse<License>> => {
  return await request.getOriginal({
    url: '/gateway/licence/info',
  })
}